package com.greyu.ysj.mapper;

import com.greyu.ysj.entity.CbtDraw;
import com.greyu.ysj.entity.CbtDrawExample;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CbtDrawMapper {
    long countByExample(CbtDrawExample example);

    int deleteByExample(CbtDrawExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(CbtDraw record);

    int insertSelective(CbtDraw record);

    List<CbtDraw> selectByExample(CbtDrawExample example);

    CbtDraw selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CbtDraw record, @Param("example") CbtDrawExample example);

    int updateByExample(@Param("record") CbtDraw record, @Param("example") CbtDrawExample example);

    int updateByPrimaryKeySelective(CbtDraw record);

    int updateByPrimaryKey(CbtDraw record);
    
    int selectMaxDrawId();
    //***************************
    double selectTotalDrawByuserId(int userId);
    
    int countTodayByUserId(Integer userId);
    
    List<CbtDraw> selectAllDrawByuserId(Integer userId);
}